import Coupons from "./datas/coupon/coupons.json"

export default {
    namespaced: true,
    state: {
        coupons: []
    },
    mutations: {
        setCoupons (state, coupons) {
            state.coupons = coupons
        }
    },
    actions: {
        getCouponsAction ({ commit }, status) {
            commit('setCoupons', Coupons.filter(coupon => coupon.status === status))
        }
    }
}